import { request } from './request';

export function getCourseDetail(id) {
  return request({
    url: `/course/${id}`,
  });
}

export function getCourseComments(id) {
  return request({
    url: `/course/${id}/comments`,
  });
}

export function likeCourse(id) {
  return request({
    url: `/course/${id}/like`,
  });
}

export function commentCourse(id, data) {
  return request({
    url: `/course/${id}/comment`,
    method: 'post',
    data,
  });
}
